<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@drawable/bg_gradient"
    android:paddingTop="@dimen/_20sdp"
    tools:context=".view.Activities.CreateCarActivity">

    <ProgressBar
        android:id="@+id/loading"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:indeterminateTint="?attr/purple"
        android:visibility="visible"
        app:layout_constraintBottom_toTopOf="@+id/nsv"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="@+id/CardList" />

    <View
        android:id="@+id/view_bg"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        app:layout_constraintBottom_toTopOf="@+id/ll_bg"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintVertical_weight="1" />

    <ImageButton
        android:id="@+id/btBack"
        android:layout_width="@dimen/_22sdp"
        android:layout_height="@dimen/_22sdp"
        android:layout_gravity="center"
        android:background="@drawable/icon_arrow_left_white_color"
        android:layout_marginStart="@dimen/_10sdp"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent" />

    <TextView
        android:id="@+id/textView"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:fontFamily="@font/inter_medium"
        android:gravity="center"
        android:includeFontPadding="false"
        android:text="Оплата"
        android:textColor="?attr/white"
        android:textSize="@dimen/_19ssp"
        app:layout_constraintTop_toTopOf="parent" />


    <LinearLayout
        android:id="@+id/ll_bg"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:background="?attr/second_background"
        android:orientation="vertical"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/view_bg"
        app:layout_constraintVertical_weight="3" />

    <androidx.recyclerview.widget.RecyclerView
        android:id="@+id/CardList"
        android:layout_width="match_parent"
        android:layout_height="@dimen/_120sdp"
        android:layout_marginTop="@dimen/_40sdp"
        android:orientation="horizontal"
        android:paddingStart="@dimen/_20sdp"
        android:visibility="invisible"
        app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
        app:layout_constraintTop_toBottomOf="@+id/textView" />

    <ImageView
        android:id="@+id/btToCreate"
        android:layout_width="@dimen/_40sdp"
        android:layout_height="@dimen/_70sdp"
        android:background="@drawable/button_add_card"
        app:layout_constraintBottom_toBottomOf="@+id/CardList"
        app:layout_constraintStart_toStartOf="@+id/CardList"
        app:layout_constraintTop_toTopOf="@+id/CardList" />

    <androidx.core.widget.NestedScrollView
        android:id="@+id/nsv"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginHorizontal="@dimen/_20sdp"
        android:layout_marginVertical="@dimen/_80sdp"
        android:background="@drawable/bg_form_rounded"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/CardList">

        <LinearLayout
            android:id="@+id/ll_main_block"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical"
            android:paddingVertical="@dimen/_10sdp">

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:fontFamily="@font/inter_semibold"
                android:text="Информация о броне"
                android:layout_marginStart="@dimen/_20sdp"
                android:layout_marginTop="@dimen/_5sdp"
                android:textColor="?attr/main_text_color"
                android:textSize="@dimen/_13sdp" />

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="@dimen/_15sdp"
                android:paddingHorizontal="@dimen/_20sdp"
                android:orientation="horizontal">

                <TextView
                    android:id="@+id/tvPlace"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:fontFamily="@font/inter_semibold"
                    android:text="Тариф"
                    android:layout_weight="1"
                    android:textColor="?attr/park_info_text_color"
                    android:textSize="@dimen/_12sdp" />

                <TextView
                    android:id="@+id/tvTarif"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_weight="1"
                    android:fontFamily="@font/inter_semibold"
                    android:text="300 руб/час"
                    android:textAlignment="textEnd"
                    android:textColor="?attr/park_info_text_color"
                    android:textSize="@dimen/_12sdp" />
            </LinearLayout>
            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="@dimen/_4sdp"
                android:paddingHorizontal="@dimen/_20sdp"
                android:orientation="horizontal">

                <TextView
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:fontFamily="@font/inter_semibold"
                    android:text="Автомобиль"
                    android:layout_weight="1"
                    android:textColor="?attr/park_info_text_color"
                    android:textSize="@dimen/_12sdp" />

                <TextView
                    android:id="@+id/tvNumber"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_weight="1"
                    android:fontFamily="@font/inter_semibold"
                    android:text="A782EO 777"
                    android:textAlignment="textEnd"
                    android:textColor="?attr/park_info_text_color"
                    android:textSize="@dimen/_12sdp" />
            </LinearLayout>
            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="@dimen/_4sdp"
                android:paddingHorizontal="@dimen/_20sdp"
                android:orientation="horizontal">

                <TextView
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:fontFamily="@font/inter_semibold"
                    android:text="Время заезда"
                    android:layout_weight="1"
                    android:textColor="?attr/park_info_text_color"
                    android:textSize="@dimen/_12sdp" />

                <TextView
                    android:id="@+id/tvStartTime"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_weight="1"
                    android:fontFamily="@font/inter_semibold"
                    android:text="9:28"
                    android:textAlignment="textEnd"
                    android:textColor="?attr/park_info_text_color"
                    android:textSize="@dimen/_12sdp" />
            </LinearLayout>
            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="@dimen/_4sdp"
                android:paddingHorizontal="@dimen/_20sdp"
                android:orientation="horizontal">

                <TextView
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:fontFamily="@font/inter_semibold"
                    android:text="Время выезда"
                    android:layout_weight="1"
                    android:textColor="?attr/park_info_text_color"
                    android:textSize="@dimen/_12sdp" />

                <TextView
                    android:id="@+id/tvEndTime"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_weight="1"
                    android:fontFamily="@font/inter_semibold"
                    android:text="12:56"
                    android:textAlignment="textEnd"
                    android:textColor="?attr/park_info_text_color"
                    android:textSize="@dimen/_12sdp" />
            </LinearLayout>
            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="@dimen/_4sdp"
                android:paddingHorizontal="@dimen/_20sdp"
                android:orientation="horizontal">

                <TextView
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:fontFamily="@font/inter_semibold"
                    android:text="Продолжительность"
                    android:layout_weight="0.7"
                    android:textColor="?attr/park_info_text_color"
                    android:textSize="@dimen/_12sdp" />

                <TextView
                    android:id="@+id/tvDelta"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_weight="1"
                    android:fontFamily="@font/inter_semibold"
                    android:text="3ч 28мин"
                    android:textAlignment="textEnd"
                    android:textColor="?attr/park_info_text_color"
                    android:textSize="@dimen/_12sdp" />
            </LinearLayout>

            <View
                android:layout_width="match_parent"
                android:layout_height="1dp"
                android:layout_marginTop="@dimen/_10sdp"
                android:background="@drawable/bg_gradient"
                />
            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="@dimen/_10sdp"
                android:paddingHorizontal="@dimen/_20sdp"
                android:orientation="horizontal">

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:fontFamily="@font/inter_medium"
                    android:text="Общая стоимость"
                    android:textColor="?attr/main_text_color"
                    android:textSize="@dimen/_11sdp" />

                <TextView
                    android:id="@+id/tvSum"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_weight="1"
                    android:fontFamily="@font/inter_semibold"
                    android:text="350.00 руб."
                    android:textAlignment="textEnd"
                    android:textColor="?attr/main_text_color"
                    android:textSize="@dimen/_12sdp" />
            </LinearLayout>
            <View
                android:layout_width="match_parent"
                android:layout_height="1dp"
                android:layout_marginTop="@dimen/_8sdp"
                android:background="?attr/second_background"
                />
            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="@dimen/_8sdp"
                android:paddingHorizontal="@dimen/_20sdp"
                android:orientation="horizontal">

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:fontFamily="@font/inter_medium"
                    android:text="Скидка"
                    android:textColor="?attr/main_text_color"
                    android:textSize="@dimen/_11sdp" />

                <TextView
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_weight="1"
                    android:fontFamily="@font/inter_semibold"
                    android:text="-0.00 руб."
                    android:textAlignment="textEnd"
                    android:textColor="?attr/main_text_color"
                    android:textSize="@dimen/_12sdp" />
            </LinearLayout>

            <View
                android:layout_width="match_parent"
                android:layout_height="1dp"
                android:layout_marginTop="@dimen/_10sdp"
                android:background="@drawable/bg_gradient"
                />

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="@dimen/_4sdp"
                android:paddingHorizontal="@dimen/_20sdp"
                android:orientation="horizontal">

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:fontFamily="@font/inter_semibold"
                    android:text="Итого"
                    android:textColor="?attr/main_text_color"
                    android:textSize="@dimen/_13sdp" />

                <TextView
                    android:id="@+id/tvFinnal"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_weight="1"
                    android:fontFamily="@font/inter_semibold"
                    android:text="339.20 руб."
                    android:textAlignment="textEnd"
                    android:textColor="?attr/main_text_color"
                    android:textSize="@dimen/_13sdp" />
            </LinearLayout>

            <androidx.cardview.widget.CardView
                android:layout_width="@dimen/_200sdp"
                android:layout_height="@dimen/_40sdp"
                android:layout_marginHorizontal="@dimen/_40sdp"
                android:layout_gravity="center"
                android:layout_marginTop="@dimen/_40sdp"
                android:layout_marginBottom="@dimen/_25sdp"
                android:background="@android:color/transparent"
                android:outlineSpotShadowColor="@color/purple"
                app:cardCornerRadius="15dp"
                app:cardElevation="15dp">

                <androidx.appcompat.widget.AppCompatButton
                    android:id="@+id/enter"
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:background="@drawable/background_button_ripple"
                    android:text="Оплатить"
                    android:textSize="@dimen/_13sdp"
                    android:textAllCaps="false"
                    android:textColor="@color/white"
                    app:cornerRadius="@dimen/_15sdp" />

            </androidx.cardview.widget.CardView>
        </LinearLayout>
    </androidx.core.widget.NestedScrollView>




</androidx.constraintlayout.widget.ConstraintLayout>